//
//  ShouCangJia.m
//  一键联IOS
//
//  Created by 徐绍明 on 15/12/25.
//  Copyright © 2015年 xufei. All rights reserved.
//

#import "ShouCangJia.h"

@implementation ShouCangJia


+(ShouCangJia *)parseShouCangJiaWithDictionary:(NSDictionary *)dict{
    ShouCangJia *shoucang = [[ShouCangJia alloc] init];
    if ([dict[@"productid"] isKindOfClass:[NSNull class]]) {
        shoucang.goodShopID = @"";
    }else{
        shoucang.goodShopID = dict[@"productid"] ;
    }
    if ([dict[@"price"] isKindOfClass:[NSNull class]]) {
        shoucang.goodOldPrice = @"";
    }else{
         shoucang.goodOldPrice = dict[@"price"] ;
    }
    if ([dict[@"productName"] isKindOfClass:[NSNull class]]) {
        shoucang.goodName = @"";
    }else{
        shoucang.goodName = dict[@"productName"];
    }
    
    if ([dict[@"productAvatar"] isKindOfClass:[NSNull class]]) {
        shoucang.goodImgUrl = @"";
    }else{
    shoucang.goodImgUrl = dict[@"productAvatar"];
    }
    if ([dict[@"discountPrice"] isKindOfClass:[NSNull class]]) {
        shoucang.goodDisPrice = @"";
    }else{
    shoucang.goodDisPrice = dict[@"discountPrice"];
    }
    
    return shoucang;
}
@end
